Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint 8 support #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gewa24
Copy link

@gewa24 gewa24 commented Feb 7, 2024

Bump eslint to 8.28, the version mongodb/mongo currently uses for linting.

modify resmoke-tags accordingly to be compatible with the new ESLint interface.

Update parser options to use the same ecmaversion and source type used for linting; this allows us to operate on files with import/export statements because we specify the source type as module.

We should maybe also change env.es6 to env.es2022 but I didn't get a chance to try this yet.

Confirmed this works for add-tags; didn't test anything else yet, but wanted to make this available in case anyone else needs to run the tool before I get back to this.

rules: {"mongodb-server/resmoke-tags": ruleOptions},
overrideConfig: {
env: {
"es6": true,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change this line to "es2022": true match https://github.com/mongodb/mongo/blob/2cf2693a7846bb49b9e819c8be4863e096c85ebe/.eslintrc.yml#L2. Ditto line 15.

@@ -23,7 +23,7 @@
"dependencies": {
"commander": "2.16.0",
"diff": "3.5.0",
"eslint": "5.16.0",
"eslint": "8.28.0",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also update the peerDependencies and engines.

One thought would be to use what is current in the ESLint generator.

"eslint": ">=7"
"node": "^14.17.0 || ^16.0.0 || >= 18.0.0"

Another thought would be to use what is declared in ESLint version 8.28.0.

"eslint": ">=8.28.0"
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"

I mostly care about ensuring node8 isn't supported because I think the trimStart() usage was always a problem for it and preventing the install would have been more obvious about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants